home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 117
/
FreelogNo117-OctobreNovembre2013.iso
/
Programmation
/
jedit
/
jedit5.1.0install.exe
/
{app}
/
macros
/
Emacs
/
Emacs_Open_Line.bsh
< prev
next >
Wrap
Text File
|
2013-07-28
|
433b
|
19 lines
/**
* Insert a newline after the caret, without moving the caret. This macro
* corresponds to the Emacs (open-line) capability.
*/
source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));
void emacsOpenLine()
{
caret = textArea.getCaretPosition();
buffer.insert (caret, "\n");
// Caret moved. Back it up.
textArea.goToPrevLine (false);
textArea.goToEndOfLine (false);
}
emacsOpenLine();